<!-- $Id: order_info.htm 17060 2010-03-25 03:44:42Z liuhui $ -->

{include file="pageheader.htm"}
{insert_scripts files="topbar.js,../js/utils.js,listtable.js,selectzone.js,../js/common.js"}
{if $user}
<div id="topbar">
  <div align="right"><a href="" onclick="closebar(); return false"><img src="images/close.gif" border="0" /></a></div>
  <table width="100%" border="0">
    <caption><strong> {$lang.buyer_info} </strong></caption>
    <tr>
      <td> {$lang.email} </td>
      <td> <a href="mailto:{$user.email}">{$user.email}</a> </td>
    </tr>
    <tr>
      <td> {$lang.user_money} </td>
      <td> {$user.formated_user_money} </td>
    </tr>
    <tr>
      <td> {$lang.pay_points} </td>
      <td> {$user.pay_points} </td>
    </tr>
    <tr>
      <td> {$lang.rank_points} </td>
      <td> {$user.rank_points} </td>
    </tr>
    <tr>
      <td> {$lang.rank_name} </td>
      <td> {$user.rank_name} </td>
    </tr>
    <tr>
      <td> {$lang.bonus_count} </td>
      <td> {$user.bonus_count} </td>
    </tr>
  </table>

  {foreach from=$address_list item=address}
  <table width="100%" border="0">
    <caption><strong> {$lang.consignee} : {$address.consignee|escape} </strong></caption>
    <tr>
      <td> {$lang.email} </td>
      <td> <a href="mailto:{$address.email}">{$address.email}</a> </td>
    </tr>
    <tr>
      <td> {$lang.address} </td>
      <td> {$address.address|escape} </td>
    </tr>
    <tr>
      <td> {$lang.zipcode} </td>
      <td> {$address.zipcode|escape} </td>
    </tr>
    <tr>
      <td> {$lang.tel} </td>
      <td> {$address.tel|escape} </td>
    </tr>
    <tr>
      <td> {$lang.mobile} </td>
      <td> {$address.mobile|escape} </td>
    </tr>
  </table>
  {/foreach}
</div>
{/if}

<form action="order.php?act=operate" method="post" name="theForm">
<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
  <tr>
    <td colspan="4">
      <div align="center">
        <input name="prev" type="button" class="button" onClick="location.href='order.php?act=info&order_id={$prev_id}';" value="{$lang.prev}" {if !$prev_id}disabled{/if} />
        <input name="next" type="button" class="button" onClick="location.href='order.php?act=info&order_id={$next_id}';" value="{$lang.next}" {if !$next_id}disabled{/if} />
    </div></td>
  </tr>
  <tr>
    <th colspan="4">{$lang.base_info}</th>
  </tr>
  <tr>
    <td width="18%"><div align="right"><strong>{$lang.label_order_sn}</strong></div></td>
    <td width="34%">{$order.order_sn}</td>
    <td width="15%"><div align="right"><strong>{$lang.label_order_status}</strong></div></td>
    <td>{$order.status}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_user_name}</strong></div></td>
    <td>{$order.user_name|default:$lang.anonymous}</td>
    <td><div align="right"><strong>{$lang.label_order_time}</strong></div></td>
    <td>{$order.formated_add_time}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_payment}</strong></div></td>
    <td>{if $order.pay_id > 0}{$order.pay_name}{else}{$lang.require_field}{/if}<a href="order.php?act=edit&order_id={$order.order_id}&step=payment" class="special">{$lang.edit}</a>
    ({$lang.action_note}: <span onclick="listTable.edit(this, 'edit_pay_note', {$order.order_id})">{if $order.pay_note}{$order.pay_note}{else}N/A{/if}</span>)</td>
    <td><div align="right"><strong>{$lang.label_pay_time}</strong></div></td>
    <td>{$order.pay_time}</td>
  </tr>
  <tr>
    <th colspan="4">{$lang.other_info}</th>
    </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_postscript}</strong></div></td>
    <td colspan="3">{$order.postscript}</td>
  </tr>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
  <tr>
    <th colspan="2" scope="col">服务信息</th>
    </tr>
  {foreach from=$goods_list item=service}
 <tr>
          	<td>服务名称：</td>
            <td bgcolor="#ffffff">
              {$service.service_name}
              </td>
          </tr>
          <tr>
          	<td>基本信息</td>
            <td align="left" bgcolor="#ffffff">{if $service.type eq 'essay' || $service.type eq 'chenshu'}
              	 {if $service.retime eq 1}普通5天回复{else}加急2天回复，加急费（{$service.formated_reprice}）{/if}<br>
              	 字数：{$service.wordnumber},费用{$service.formated_price}
              	 {elseif $service.type eq 'resume'}
              	 {if $service.retime eq 1}普通5天回复{else}加急2天回复，加急费（{$service.formated_reprice}）{/if}<br>
              	 {elseif $service.type eq 'all'}
              	 邮箱{$service.email},联系电话{$service.mobile}
              	 {elseif $service.type eq 'multiple' || $service.type eq 'quiz'}
              	 联系方式：{$service.contact_type}{$service.contact}<br>
              	 咨询时间：{$service.contact_time}
              	{/if}</td>
           </tr>
           {if $service.type eq 'essay' || $service.type eq 'chenshu'}
           <tr>
           		<td>Essay题目：</td>
           		<td>{$service.title}</td>
           </tr>
           <tr>
           		<td>Essay内容：</td>
           		<td>{$service.content}</td>
           </tr>
           <tr>
           		<td>EssayWord 文档：</td>
           		<td><a href="{$service.essay_file}">下载essaywrod文档</a></td>
           </tr>
           <tr>
           		<td>个人简历：</td>
           		<td><a href="{$service.resume_file}">下载个人简历</a></td>
           </tr>
           {elseif $service.type eq 'resume'}
           <tr>
           		<td>简历推荐信内容：</td>
           		<td>{$service.content}</td>
           </tr>
           <tr>
           		<td>个人简历：</td>
           		<td><a href="{$service.resume_file}">下载个人简历</a></td>
           </tr>
           {elseif $service.type eq 'all'}
           <tr>
           		<td>全套申请服务详情：</td>
           		<td>{$service.content}</td>
           </tr>
           <tr>
           		<td>其它要求：</td>
           		<td>{$service.remark}</td>
           </tr>
            <tr>
           		<td>个人简历：</td>
           		<td><a href="{$service.resume_file}">下载个人简历</a></td>
           </tr>
		   {elseif $service.type eq 'multiple' || $service.type eq 'quiz'}
		    <tr>
           		<td>学校及专业：</td>
           		<td>{$service.content}</td>
           </tr>
		    <tr>
           		<td>个人简历：</td>
           		<td><a href="{$service.resume_file}">下载个人简历</a></td>
           </tr>
           {/if}
           <tr>
           	<td>小计</td>
            <td align="right" bgcolor="#ffffff">{$service.formated_subtotal}</td>
          </tr>
          <tr>
          	<td colspan="2" style="border-top:1px solid red;"></td>
          </tr>
  {/foreach}
</table>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
    <td><div align="right"> = {$lang.label_money_dues}<strong>{$order.formated_goods_amount}</strong>
     </div></td>
  </tr>
</table>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th colspan="6">{$lang.action_info}</th>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_action_note}</strong></div></td>
  <td colspan="5"><textarea name="action_note" cols="80" rows="3"></textarea></td>
    </tr>
  <tr>
    <td><div align="right"></div>
      <div align="right"><strong>{$lang.label_operable_act}</strong> </div></td>
    <td colspan="5">{if $operable_list.confirm}
      <input name="confirm" type="submit" value="{$lang.op_confirm}" class="button" />
        {/if} {if $operable_list.pay}
        <input name="pay" type="submit" value="{$lang.op_pay}" class="button" />
        {/if} {if $operable_list.unpay}
        <input name="unpay" type="submit" class="button" value="{$lang.op_unpay}" />
        {/if} {if $operable_list.split}
        <input name="ship" type="submit" value="处理中" class="button" />
        {/if} 
        {if $operable_list.finshed}
        <input name="finshed" type="submit" value="已完成" class="button" />
        {/if}
        {if $operable_list.unship}
        <input name="unship" type="submit" value="{$lang.op_unship}" class="button" />
        {/if} {if $operable_list.receive}
        <input name="receive" type="submit" value="{$lang.op_receive}" class="button" />
        {/if} {if $operable_list.cancel}
        <input name="cancel" type="submit" value="{$lang.op_cancel}" class="button" />
        {/if} {if $operable_list.invalid}
        <input name="invalid" type="submit" value="{$lang.op_invalid}" class="button" />
        {/if} {if $operable_list.return}
        <input name="return" type="submit" value="{$lang.op_return}" class="button" />
        {/if} {if $operable_list.to_delivery}
        <input name="to_delivery" type="submit" value="{$lang.op_to_delivery}" class="button"/>
        <input name="order_sn" type="hidden" value="{$order.order_sn}" />
        {/if} 
        {if $operable_list.remove}
        <input name="remove" type="submit" value="{$lang.remove}" class="button" onClick="return window.confirm('{$lang.js_languages.remove_confirm}');" />
        {/if}
        {if $order.extension_code eq "group_buy"}{$lang.notice_gb_ship}{/if}
        {if $agency_list}
        <input name="assign" type="submit" value="{$lang.op_assign}" class="button" onclick="return assignTo(document.forms['theForm'].elements['agency_id'].value)" />
        <select name="agency_id"><option value="0">{$lang.select_please}</option>
        {foreach from=$agency_list item=agency}
        <option value="{$agency.agency_id}" {if $agency.agency_id eq $order.agency_id}selected{/if}>{$agency.agency_name}</option>
        {/foreach}
        </select>
        {/if}
        <input name="order_id" type="hidden" value="{$smarty.request.order_id}"></td>
    </tr>
  <tr>
    <th>{$lang.action_user}</th>
    <th>{$lang.action_time}</th>
    <th>{$lang.order_status}</th>
    <th>{$lang.pay_status}</th>
    <th>{$lang.action_note}</th>
  </tr>
  {foreach from=$action_list item=action}
  <tr>
    <td><div align="center">{$action.action_user}</div></td>
    <td><div align="center">{$action.action_time}</div></td>
    <td><div align="center">{$action.order_status}</div></td>
    <td><div align="center">{$action.pay_status}</div></td>
    <td>{$action.action_note|nl2br}</td>
  </tr>
  {/foreach}
</table>
</div>
</form>
{literal}
<script language="JavaScript">
{/literal}
  var oldAgencyId = {$order.agency_id|default:0};
{literal}
  onload = function()
  {
    // 开始检查订单
    startCheckOrder();
  }

  /**
   * 把订单指派给某办事处
   * @param int agencyId
   */
  function assignTo(agencyId)
  {
    if (agencyId == 0)
    {
      alert(pls_select_agency);
      return false;
    }
    if (oldAgencyId != 0 && agencyId == oldAgencyId)
    {
      alert(pls_select_other_agency);
      return false;
    }
    return true;
  }
</script>
{/literal}

{include file="pagefooter.htm"}